package clientData;

import java.util.Date;

public class PostData implements PostDataInt {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** The id. */
	private int id;
	
	/** The title. */
	private String title;
	
	/** The content. */
	private String content;
	
	/** The creation time. */
	private Date creationTime;
	
	/** The editing time. */
	private Date editingTime;
	
	/** The creator. the member that create the post.*/
	private MemberDataInt creator;
	
	public PostData(int id, String title, String content, Date creationTime, Date editingTime, MemberDataInt creator){
		this.id = id;
		this.title = title;
		this.content = content;
		this.creationTime = creationTime;
		this.editingTime = editingTime;
		this.creator = creator;
	}
	
	/* (non-Javadoc)
	 * @see domainModel.PostInt#getContent()
	 */
	@Override
	public String getContent() {
		return this.content;
	}

	/* (non-Javadoc)
	 * @see domainModel.PostInt#getCreationTime()
	 */
	@Override
	public Date getCreationTime() {
		return this.creationTime;
	}

	/* (non-Javadoc)
	 * @see domainModel.PostInt#getEditingTime()
	 */
	@Override
	public Date getEditingTime() {
		return this.editingTime;
	}

	/* (non-Javadoc)
	 * @see domainModel.PostInt#getId()
	 */
	@Override
	public int getId() {
		return this.id;
	}

	/* (non-Javadoc)
	 * @see domainModel.PostInt#getTitle()
	 */
	@Override
	public String getTitle() {
		return this.title;
	}
	
	public MemberDataInt getCreator()
	{
		return this.creator;
	}
        
        public String toString(){
            return this.getTitle();
        }

}
